package com.losdun.points.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 积分记录表
 * @author sword.ye
 */
@Data
@TableName(value = "points_user_records")
public class PointsRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 记录id
     */
    @TableId(value = "record_id", type = IdType.AUTO)
    private Long recordId;

    /**
     * 操作人用户
     */
    private String sysUserName;

    /**
     * 操作人id
     */
    private Long sysUserId;

    /**
     *
     */
    private Integer sourceType;

    private Integer userType;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 用户
     */
    @TableField(condition = SqlCondition.LIKE)
    private String userName;

    /**
     * 修改前的信用分
     */
    private Integer prePoint;

    /**
     * 1增加 2减少
     */
    private Integer pointType;

    /**
     * 分数
     */
    private Integer point;

    /**
     * 修改后的信用分
     */
    private Integer nextPoint;

    /**
     * 备注
     */
    private String reason;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;


}
